home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIWebBrowserChrome.idl < prev    next >
Text File  |  2006-05-08  |  6KB  |  155 lines

  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications, Inc.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   Travis Bogard <travis@netscape.com>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #include "nsISupports.idl"
  41.  
  42. interface nsIWebBrowser;
  43. interface nsIDocShellTreeItem;
  44.  
  45. /**
  46.  * nsIWebBrowserChrome corresponds to the top-level, outermost window
  47.  * containing an embedded Gecko web browser.
  48.  *
  49.  * @status FROZEN
  50.  */
  51.  
  52. [scriptable, uuid(BA434C60-9D52-11d3-AFB0-00A024FFC08C)]
  53. interface nsIWebBrowserChrome : nsISupports
  54. {
  55.     const unsigned long STATUS_SCRIPT         = 0x00000001;
  56.     const unsigned long STATUS_SCRIPT_DEFAULT = 0x00000002;
  57.     const unsigned long STATUS_LINK           = 0x00000003;
  58.  
  59.     /**
  60.      * Called when the status text in the chrome needs to be updated.
  61.      * @param statusType indicates what is setting the text
  62.      * @param status status string. null is an acceptable value meaning
  63.      *               no status.
  64.      */
  65.     void setStatus(in unsigned long statusType, in wstring status);
  66.  
  67.     /**
  68.      * The currently loaded WebBrowser.  The browser chrome may be
  69.      * told to set the WebBrowser object to a new object by setting this
  70.      * attribute.  In this case the implementer is responsible for taking the 
  71.      * new WebBrowser object and doing any necessary initialization or setup 
  72.      * as if it had created the WebBrowser itself.  This includes positioning
  73.      * setting up listeners etc.
  74.      */
  75.     attribute nsIWebBrowser webBrowser;
  76.  
  77.     /**
  78.      * Definitions for the chrome flags
  79.      */
  80.     const unsigned long CHROME_DEFAULT          = 0x00000001;
  81.     const unsigned long CHROME_WINDOW_BORDERS   = 0x00000002;
  82.     const unsigned long CHROME_WINDOW_CLOSE     = 0x00000004;
  83.     const unsigned long CHROME_WINDOW_RESIZE    = 0x00000008;
  84.     const unsigned long CHROME_MENUBAR          = 0x00000010;
  85.     const unsigned long CHROME_TOOLBAR          = 0x00000020;
  86.     const unsigned long CHROME_LOCATIONBAR      = 0x00000040;
  87.     const unsigned long CHROME_STATUSBAR        = 0x00000080;
  88.     const unsigned long CHROME_PERSONAL_TOOLBAR = 0x00000100;
  89.     const unsigned long CHROME_SCROLLBARS       = 0x00000200;
  90.     const unsigned long CHROME_TITLEBAR         = 0x00000400;
  91.     const unsigned long CHROME_EXTRA            = 0x00000800;
  92.     
  93.     // createBrowserWindow specific flags
  94.     const unsigned long CHROME_WITH_SIZE        = 0x00001000;
  95.     const unsigned long CHROME_WITH_POSITION    = 0x00002000;
  96.  
  97.     // special cases
  98.     const unsigned long CHROME_WINDOW_MIN       = 0x00004000;
  99.     const unsigned long CHROME_WINDOW_POPUP     = 0x00008000;
  100.  
  101.     const unsigned long CHROME_WINDOW_RAISED    = 0x02000000;
  102.     const unsigned long CHROME_WINDOW_LOWERED   = 0x04000000;
  103.     const unsigned long CHROME_CENTER_SCREEN    = 0x08000000;
  104.     const unsigned long CHROME_DEPENDENT        = 0x10000000;
  105.     // Note: The modal style bit just affects the way the window looks and does
  106.     //       mean it's actually modal.
  107.     const unsigned long CHROME_MODAL            = 0x20000000; 
  108.     const unsigned long CHROME_OPENAS_DIALOG    = 0x40000000;
  109.     const unsigned long CHROME_OPENAS_CHROME    = 0x80000000;
  110.     
  111.     const unsigned long CHROME_ALL              = 0x00000ffe;
  112.     
  113.     /**
  114.      * The chrome flags for this browser chrome. The implementation should
  115.      * reflect the value of this attribute by hiding or showing its chrome
  116.      * appropriately.
  117.      */
  118.     attribute unsigned long chromeFlags;
  119.  
  120.     /**
  121.      * Asks the implementer to destroy the window associated with this
  122.      * WebBrowser object.
  123.      */
  124.     void destroyBrowserWindow();
  125.  
  126.     /**
  127.      * Tells the chrome to size itself such that the browser will be the 
  128.      * specified size.
  129.      * @param aCX new width of the browser
  130.      * @param aCY new height of the browser
  131.      */
  132.     void sizeBrowserTo(in long aCX, in long aCY);
  133.     
  134.     /**
  135.      * Shows the window as a modal window.
  136.      * @return (the function error code) the status value specified by
  137.      *         in exitModalEventLoop.
  138.      */
  139.     void showAsModal();
  140.     
  141.     /**
  142.      * Is the window modal (that is, currently executing a modal loop)?
  143.      * @return true if it's a modal window
  144.      */
  145.     boolean isWindowModal();
  146.  
  147.     /**
  148.      * Exit a modal event loop if we're in one. The implementation
  149.      * should also exit out of the loop if the window is destroyed.
  150.      * @param aStatus - the result code to return from showAsModal
  151.      */
  152.     void exitModalEventLoop(in nsresult aStatus);
  153. };
  154.  
  155.